package com.example.tallybook.data

import androidx.room.Entity
import androidx.room.PrimaryKey
import java.time.LocalDateTime

@Entity(tableName = "transactions")
data class Transaction(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val amount: Double,
    val description: String,
    val category: String,
    val type: TransactionType,
    val date: LocalDateTime = LocalDateTime.now(),
    val note: String = ""
)

enum class TransactionType {
    INCOME, // 收入
    EXPENSE // 支出
} 